import { getAction, putAction, postAction } from '@/api/manage'
import { serviceApi } from '@/api/common.js'
/**
 * 公共API接口
 */
export const api = {
  list: serviceApi.auth + '/fill-rules',
  delete: (ids) => serviceApi.auth + `/fill-rules/${ids}`
}

/**
 * 获取列表
 * @param {*} params
 * @returns
 */
export const listFillRules = params => getAction(serviceApi.auth + '/fill-rules/list', params);

/**
 *
 * @param {*} params
 * @returns
 */
export const testFillRule = (ruleCode, params) => getAction(serviceApi.auth + `/fill-rules/test/${ruleCode}`, params);

/**
 * @param {*} params
 * @returns
 */
export const addFillRule = params => postAction(serviceApi.auth + '/fill-rules', params);

/**
 *
 * @param {*} params
 * @returns
 */
export const editFillRule = params => putAction(serviceApi.auth + '/fill-rules', params);
